import os.path
import time
from selenium import webdriver
from selenium.webdriver.common.by import By

file = "file:///" + os.path.abspath("html2") + '/注册实例.html'
driver = webdriver.Chrome()
driver.maximize_window()
driver.get(file)
time.sleep(2)

# 点击alter
driver.find_element(By.ID, "alert").click()
time.sleep(1)


driver.quit()